<?php
    /**
    * Actions Map Management
    * @author: trungdt
    * @since: feb 1, 2011
    * @version: 1.0
    * 
    * Change logs
    * feb 1, 2011 - trungdt - first create
    * Feb 11, 2011 - trungdt  - Alter actions map table, add field params_map
    *                       ALTER TABLE `ag_action_maps` ADD `params_map` TEXT CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL 
    */
    
    
    /**
    * Action Map
    * After map in URL, 
    * Next, system explode the params_map string, then, continue map ralative param from request
    */
    if (!defined("EXPONENT")) exit("");
    if (exponent_users_isAdmin())
    {
        global $db;

        $actions=$db->selectObjects("action_maps", "1 ORDER BY module, action");

        $template = new template("navigationmodule","_actions_map_management",$loc);
        global $user;
        $template->assign('canManage',((isset($user->is_acting_admin) && $user->is_acting_admin == 1) ? 1 : 0));
        $template->assign('actions', $actions);
        exponent_flow_set(SYS_FLOW_PUBLIC, SYS_FLOW_ACTION);
        $template->output();
        exponent_sessions_set("AB_THEME_TOP_CONTAINER_SRC","top_systemmodule_".LANG);
    exponent_sessions_set("AB_THEME_TOP_CONTAINER_TYPE","textmodule");
    }
    else
    {
        echo exponent_http_error(403);
    }
?>